set(LIB_NAME CameraApp)

find_package(cxxopts CONFIG REQUIRED)
find_package(micro-xclib CONFIG REQUIRED)
find_package(OpenCV CONFIG REQUIRED)

aux_source_directory(. SRC)

add_library(${LIB_NAME} STATIC
        ${SRC}
)

target_link_libraries(${LIB_NAME}
    PRIVATE
        MICRO_XCLIB::MICRO_XCLIB
        singletonpool
        linenoise
        XclibProtocol
        cxxopts::cxxopts
    PUBLIC
        ${OpenCV_LIBS} ${OpenCV_LIB_COMPONENTS}
)

target_include_directories(${LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})